import Components from "unplugin-vue-components/vite";
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";

export default function createVueComponents() {

  return Components({
    // 可配置自动导入哪些目录 就不用import Foo from './components/Foo.vue'
    dirs: ['src/components'],
    resolvers: [
      AntDesignVueResolver({
        importStyle: false, // css in js
      }),
    ],
    dts: false // 或指定路径 dts: 'components.d.ts'
  })
}